<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich" template="layout/template.xhtml">

	<ui:define name="body">
		<h:form id="formPrueba" styleClass="edit">
			<h1>Welcome to Seam!</h1>
			<!--<rich:panel>
				<h:panelGrid columns="2">
					<h:graphicImage value="/img/seamlogo.png" alt="Seam logo" />
					<s:div styleClass="info">
						<p><strong>Your seam-gen project is deployed!</strong> Here
						are some of the features this project provides:</p>
						<ul class="bullets">
							<li>Ant build script</li>
							<li>Deployment to JBoss AS (EAR or WAR)</li>
							<li>Development and production profiles</li>
							<li>Integration testing using TestNG and Embedded JBoss</li>
							<li>JavaBean or EJB 3.0 Seam components</li>
							<li>JPA entity classes</li>
							<li>A configurable DataSource and JPA EntityManager</li>
							<li>Templated Facelets views</li>
							<li>RichFaces panels and tables</li>
							<li>Default CSS stylesheet</li>
							<li>Internationalization support</li>
						</ul>
					</s:div>
				</h:panelGrid>
			</rich:panel>
			  -->
			<rich:dataTable rowKeyVar="_rowvar" frozenColCount="1" height="400px"
				width="100%" rows="40" value="#{nodeList.resultList}"
				sortMode="single" id="nodeList" var="_node"
				rendered="#{not empty nodeList.resultList}"
				onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
				onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'">
				<f:facet name="header">
					<h:outputText
						value="TABLA DE PRUEBA Results (#{empty nodeList.resultList ? 0 : (nodeList.paginated ? nodeList.resultCount : nodeList.resultList.size)})" />
				</f:facet>
				<rich:column>
					<f:facet name="header">
						<ui:include src="layout/sort.xhtml">
							<ui:param name="entityList" value="#{nodeList}" />
							<ui:param name="propertyLabel" value="Nid" />
							<ui:param name="propertyPath" value="node.nid" />
						</ui:include>
					</f:facet>
					<h:outputText value="#{_node.nid}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<ui:include src="layout/sort.xhtml">
							<ui:param name="entityList" value="#{nodeList}" />
							<ui:param name="propertyLabel" value="Vid" />
							<ui:param name="propertyPath" value="node.vid" />
						</ui:include>
					</f:facet>
					<h:outputText value="#{_node.vid}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<ui:include src="layout/sort.xhtml">
							<ui:param name="entityList" value="#{nodeList}" />
							<ui:param name="propertyLabel" value="Type" />
							<ui:param name="propertyPath" value="node.type" />
						</ui:include>
					</f:facet>
					<h:outputText value="#{_node.type}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<ui:include src="layout/sort.xhtml">
							<ui:param name="entityList" value="#{nodeList}" />
							<ui:param name="propertyLabel" value="Language" />
							<ui:param name="propertyPath" value="node.language" />
						</ui:include>
					</f:facet>
					<h:outputText value="#{_node.language}" />
				</rich:column>
				<rich:column sortBy="#{_node.title}">
					<f:facet name="header">
						<ui:include src="layout/sort.xhtml">
							<ui:param name="entityList" value="#{nodeList}" />
							<ui:param name="propertyLabel" value="Title" />
							<ui:param name="propertyPath" value="node.title" />
						</ui:include>
					</f:facet>
					<h:outputText value="#{_node.title}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<ui:include src="layout/sort.xhtml">
							<ui:param name="entityList" value="#{nodeList}" />
							<ui:param name="propertyLabel" value="Uid" />
							<ui:param name="propertyPath" value="node.uid" />
						</ui:include>
					</f:facet>
					<h:outputText value="#{_node.uid}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<ui:include src="layout/sort.xhtml">
							<ui:param name="entityList" value="#{nodeList}" />
							<ui:param name="propertyLabel" value="Status" />
							<ui:param name="propertyPath" value="node.status" />
						</ui:include>
					</f:facet>
					<h:outputText value="#{_node.status}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<ui:include src="layout/sort.xhtml">
							<ui:param name="entityList" value="#{nodeList}" />
							<ui:param name="propertyLabel" value="Created" />
							<ui:param name="propertyPath" value="node.created" />
						</ui:include>
					</f:facet>
					<h:outputText value="#{_node.created}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<ui:include src="layout/sort.xhtml">
							<ui:param name="entityList" value="#{nodeList}" />
							<ui:param name="propertyLabel" value="Changed" />
							<ui:param name="propertyPath" value="node.changed" />
						</ui:include>
					</f:facet>
					<h:outputText value="#{_node.changed}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<ui:include src="layout/sort.xhtml">
							<ui:param name="entityList" value="#{nodeList}" />
							<ui:param name="propertyLabel" value="Comment" />
							<ui:param name="propertyPath" value="node.comment" />
						</ui:include>
					</f:facet>
					<h:outputText value="#{_node.comment}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<ui:include src="layout/sort.xhtml">
							<ui:param name="entityList" value="#{nodeList}" />
							<ui:param name="propertyLabel" value="Promote" />
							<ui:param name="propertyPath" value="node.promote" />
						</ui:include>
					</f:facet>
					<h:outputText value="#{_node.promote}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<ui:include src="layout/sort.xhtml">
							<ui:param name="entityList" value="#{nodeList}" />
							<ui:param name="propertyLabel" value="Moderate" />
							<ui:param name="propertyPath" value="node.moderate" />
						</ui:include>
					</f:facet>
					<h:outputText value="#{_node.moderate}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<ui:include src="layout/sort.xhtml">
							<ui:param name="entityList" value="#{nodeList}" />
							<ui:param name="propertyLabel" value="Sticky" />
							<ui:param name="propertyPath" value="node.sticky" />
						</ui:include>
					</f:facet>
					<h:outputText value="#{_node.sticky}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<ui:include src="layout/sort.xhtml">
							<ui:param name="entityList" value="#{nodeList}" />
							<ui:param name="propertyLabel" value="Tnid" />
							<ui:param name="propertyPath" value="node.tnid" />
						</ui:include>
					</f:facet>
					<h:outputText value="#{_node.tnid}" />
				</rich:column>
				<rich:column>
					<f:facet name="header">
						<ui:include src="layout/sort.xhtml">
							<ui:param name="entityList" value="#{nodeList}" />
							<ui:param name="propertyLabel" value="Translate" />
							<ui:param name="propertyPath" value="node.translate" />
						</ui:include>
					</f:facet>
					<h:outputText value="#{_node.translate}" />
				</rich:column>
				<f:facet name="footer">
					<rich:datascroller id="ds" immediate="true"></rich:datascroller>
				</f:facet>
			</rich:dataTable>


		</h:form>

		<div class="tableControl">
		<s:link view="/home.xhtml"
			rendered="#{nodeList.previousExists}"
			value="#{messages.left}#{messages.left} First Page" id="firstPage">
			<f:param name="firstResult" value="0" />
		</s:link> 
		<s:link view="/home.xhtml" rendered="#{nodeList.previousExists}"
			value="#{messages.left} Previous Page" id="previousPage">
			<f:param name="firstResult" value="#{nodeList.previousFirstResult}" />
		</s:link> 
		<s:link view="/home.xhtml" rendered="#{nodeList.nextExists}"
			value="Next Page #{messages.right}" id="nextPage">
			<f:param name="firstResult" value="#{nodeList.nextFirstResult}" />
		</s:link> 
		<s:link view="/home.xhtml" rendered="#{nodeList.nextExists}"
			value="Last Page #{messages.right}#{messages.right}" id="lastPage">
			<f:param name="firstResult" value="#{nodeList.lastFirstResult}" />
		</s:link>
	</div>
	</ui:define>
</ui:composition>
